Skip to main content

All Questions

3votes
0answers
395views

Setting preference summary

I'm taking and Android course and I would like to refactor the code for one of the exercises. The complete solution done by tutors is here. When I was doing this exercise by myself I was annoyed by ...
alexpfx's user avatar
2votes
0answers
171views

Implementing FusedLocationProvider for more than one Activity in Android

I am trying to implement Google Maps in Android. I am also trying to learn different design patterns. I want to use location in more than one Activity hence I have used a class named 'GoogleLocation' ...
Tiny's user avatar
3votes
1answer
3kviews

Base activity for handling network state changes in Android

I had the need in one of my activies to handle displaying a message to the user when the network disconnected, and then reload the data for a RecyclerView adapter ...
PseudoPsyche's user avatar
4votes
1answer
47views

Places and their PlaceCategories

I'm going to start small here because I actually have several questions but I'll go one at a time. In the app I am making to better learn Java/Android/SQL/OOP, I have a page where a user can define ...
The 29th Saltshaker's user avatar
1vote
2answers
715views

Properly structuring SQLite classes/operations in Android

I am new to Android development and I want to ensure I'm learning decent practices for doing things. Right now this is my database class, which currently allows me to make a new instance of the ...
user6419910's user avatar
1vote
0answers
2kviews

Repository pattern best practices

Which option is better? In the first case, I use a universal repository that can work with any entities. The methods of this repository have many parameters, such as string queries, table names, ...
Alexandr's user avatar
5votes
0answers
14kviews

Using the same RecyclerView.Adapter with a different ViewHolder

I would use the same RecyclerView.Adapter with two or more different fragments. Every fragment uses a different view items layout so I must use a different ...
Dave's user avatar
  • 111
3votes
1answer
1kviews

Event Aggregator Pattern Decoupling

I have an Android application that is using an EventBus architecture with publishing and subscribing events. Usually this is ...
AndyRoid's user avatar
8votes
2answers
1kviews

Strategy Pattern Implementation

I thought I would learn a design pattern today and picked this one. I wrote a simple Android test demo to test the pattern. main.xml ...
user2405469's user avatar
7votes
1answer
297views

Android game setup

I've been working on a basic Android game these days, but I'm a bit uncertain about my setup and need some advice. The basics of the game are simple: there are characters running on your screen and ...
DJanssens's user avatar
2votes
1answer
108views

Detaching logic from listener implementation in "Smart UI" approach to follow a proper pattern

I took this code segment from existing source on Android, but it applies to anything from ASP.NET Forms to anything else where the UI has an event callback, and the logic is implemented directly in ...
Zhuinden's user avatar
7votes
1answer
441views

Unit conversion activities

Please review these activities which handle converting units in an Android app: I would appreciate any guidance and advice on code refactoring and different design patterns or strategies that I ...
Novo's user avatar
6votes
2answers
213views

Create and organize some classes (hierarchy)

I'm trying to figure out what is the best way to create some objects in my application. The application is already running, but I want to structure things well and clean. These objects represents ...
Loris's user avatar
3votes
1answer
2kviews

TicTacToe - introduction to MVC pattern

After reading about MVC pattern in Head First Design Patterns, I've decided to write a TicTacToe app. I will not reveal the source code of the classes Matrix, <...
leonideveloper's user avatar
5votes
1answer
306views

First introduction to MVC

I'm not sure that I fully understand this pattern. I've written a simple application that uses MVC. Please criticize my approach to the use of this pattern. For convenience, I'll post the source code ...
leonideveloper's user avatar

153050per page
close